package com.dean.sql.factory;

import com.dean.sql.service.DeanSql;
import com.dean.sql.service.impl.DeanMysql;
import com.dean.utils.DeanDbUrlUtils;

/**
 * @ClassName DeanMysqlFactory
 * @Description
 * @Date 2022/1/1 13:56
 * @Created by dean
 */
public class DeanMysqlFactory extends DeanSqlFactory{
    private String url;
    public DeanMysqlFactory(String url){
        this.url = url;
    }
    @Override
    public DeanSql createDeanSql() {
        return new DeanMysql(DeanDbUrlUtils.getHostFromUrl(url).getDbName());
    }
}
